how to work with synchronization in selenium